<?php
namespace Admin\Controller;

/**
 * 平台运营收入
 * @author Administrator
 *
 */
class PlatformController extends AdminBaseController
{
   public function index()
    {
        $this->display('platform/index');
        
    }
    
    public function platlist(){
        if(session('auid')==null){
            $this->display('index/login');
            exit();
        }
         
        $page=I('page',1);
        $rows=I('rows',50);
        $start=($page-1)*$rows;
        $userid=I('userid','');
        if($userid!=''){
            $datecondi['userid'] =$userid;
        }
        $list = M('PlatformProfitlog')->where($datecondi)->order("createdate desc")->limit($start,$rows)->select();
        $count = M('PlatformProfitlog')->where($datecondi)->count();
        $map=array(
            'rows'=>$list,
            'total'=>$count
        );
        $this->ajaxReturn($map,'JSON');
    }
    
}